<extend name="public@base5"/>
<block name="main">
    <div class="wrap js-check-wrap">
        <ul class="nav nav-tabs">
            <li class="nav-item">
                <a class="nav-link active">{:lang('ADMIN_HOOK_INDEX')}</a>
            </li>
            <li class="nav-item">
                <a class="nav-link" href="{:url('Hook/sync')}">{:lang('ADMIN_HOOK_SYNC')}</a>
            </li>
        </ul>
        <form action="" method="post" class="margin-top-20">
            <php>
                $types = ["1"=>lang('System Hook'),'2'=>lang('App Hook'),'3'=>lang('Theme Hook'),'4'=>lang('Admin Theme Hook')];
            </php>
            <table class="table table-hover table-bordered">
                <thead>
                <tr>
                    <th>{:lang('NAME')}</th>
                    <th>{:lang('Type')}</th>
                    <th>{:lang('Description')}</th>
                    <th width="150">{:lang('ACTIONS')}</th>
                </tr>
                </thead>
                <tbody>
                <foreach name="hooks" item="vo">
                    <tr>
                        <td><b>{$vo.name}</b>:<span class="badge text-bg-success">{$vo.hook}</span></td>
                        <td>{$types[$vo.type]}</td>
                        <td>{$vo.description}</td>
                        <td>
                            <a class="btn btn-xs btn-primary"
                               href="javascript:parent.openIframeLayer('{:url('Hook/plugins',['hook'=>$vo['hook']])}','{:lang('Manage Plugins')} 【{$vo.hook}】',{});">{:lang('Manage Plugins')}</a>
                        </td>
                    </tr>
                </foreach>
                </tbody>
            </table>
        </form>
    </div>
</block>
